In [1]:
%load_ext autoreload
%autoreload 2
In [2]:
from dataset.generator import *
import pickle
world = World()
NSTORIES = 1000
stories = []
for _ in xrange(NSTORIES):
stories.append(world.genStory())
f = open("stories.pck", "wb")
pickle.dump(stories, f)
f.close()
In [3]:
stories = pickle.load(open("stories.pck", "rb"))
print stories[0]
In [ ]: